
import 'package:flutter/material.dart';
import 'package:FiduMart/core/utils/image_constant.dart';
import 'package:FiduMart/localization/app_export.dart';
import 'package:FiduMart/widget/custom_image_view.dart';

class PopMiningRulesExplanCom extends StatefulWidget{

  var rulesTitle = '';
  var rulesContent = '';

  PopMiningRulesExplanCom({
    Key? key,
    required this.rulesTitle,
    required this.rulesContent,
  }) : super(key: key);
  @override
  _ContiunePayState createState()=> _ContiunePayState();

}

class _ContiunePayState extends State<PopMiningRulesExplanCom> {

  void initState(){
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Dialog(
        backgroundColor: Colors.black87,
        insetPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 90),
        child: Container(
          child: Stack(
            children: [
              CustomImageView(
                imagePath: ImageConstant.storyBg,
                width: double.infinity,
                height: double.infinity,
                fit:BoxFit.fill,
                margin: EdgeInsets.fromLTRB(0, 18, 15, 0),
              ),
              Positioned(
                right: 0,
                top: 0,
                child:GestureDetector(
                  onTap: (){Get.back();},
                  child: CustomImageView(
                    imagePath: ImageConstant.exploit_close,
                    width: 50,
                    height: 50,
                  ),
                ),
              ),
              Positioned(
                top: 20,
                left: 0,
                right: 0,
                child: Center(
                  child: Text(
                    widget.rulesTitle,
                    style: TextStyle(
                      color: ColorConstant.whiteA700,
                      fontSize: 16,
                    ),
                  ),
                ),
              ),
              Positioned(
                top: 60,
                left: 15,
                right: 30,
                bottom: 30,
                child:SingleChildScrollView(
                  child: Text(
                    widget.rulesContent,
                    style: TextStyle(
                      color: ColorConstant.whiteA700,
                      fontSize: 15,
                    ),
                  ),
                ),
              ),
            ],
          ),
        )
    );
  }

  @override
  void dispose() {
    super.dispose();
  }

}